<h1>Module manager</h1>
    <div class="toppage">
    	<span class="left">
        	<select style="width:130px;">
            	<option value="1">Action</option>
                <option value="2">Edit</option>
                <option value="3">Delete</option>
            </select>
            <input type="submit" name="" value="Apply" class="btn" />
        	<font class="number">(9)</font> <a href="javascript:;">Tour Style</a><font class="line">|</font><font class="number">(1120)</font> <a href="javascript:;"><font color="#0b9901">Active</font></a><font class="line">|</font><font class="number">(5)</font> <a href="javascript:;"><font color="#c60001">Pending</font></a>
        </span>
        <?php if($this->module_model->check_action($_SESSION['_user']['group_id'],$this->router->class,'add')):?>
        	<span class="btnadd"><a href="<?php echo admin_url('module/add');?>">Add new module</a></span>
        <?php endif;?>
    </div>
    

    <div class="tableout">
		<div class="title1">
        	<div class="column" style="width:4%;"><input type="checkbox" name="" value="" /></div>
            <div class="column" style="width:54%;">Name</div>
            <div class="column" style="width:10%;">No</div>
            <div class="column" style="width:25%;">Tours</div>
            <div class="column" style="width:4%;">Status</div>
        </div>
        <?php foreach($rows_par as $k => $rows):?>
        <div class="linecate">
        	<div class="column" style="width:4%;"><input type="checkbox" name="" value="" /></div>
            <div class="column" style="width:54%;" onmouseover="Hovercat('<?php echo $rows->id;?>')" onmouseout="Outcat('<?php echo $rows->id;?>')">
            	<a href="javascript:;" class="menu1"><h2><?php echo $rows->title;?></h2></a><br />
                <div class="action" id="neocat-<?php echo $rows->id;?>">
                    <img src="images/edit.gif" /><a href="<?php echo admin_url('module/edit?id='.$rows->id);?>" onclick ="">Edit</a>|<img src="images/active.png" class="png" /><a href="#">Active</a>|<img src="images/delete.gif" /><a href="#"><font color="#be0000">Delete</font></a>
                </div>
            </div>
            <div class="column" style="width:10%;">
            	<input type="text" name="" value="1" style="width:45px; float:left;" />
                <span class="updown"><a href="#"><img src="images/up.gif" title="up" /></a><a href="#"><img src="images/down.gif" title="down" /></a></span>
            </div>
            <div class="column" style="width:25%;"><a href="#" class="post">3265</a> / <font color="#acadad">345687</font></div>
            <div class="column" style="width:4%;"><a href="#"><img src="images/active.png" class="icon png" /></a></div>
        </div>
        <?php 
        $sub_rows	=	$this->module_model->get_by_parent_id($rows->id);
        ?>
        <?php if($sub_rows):?>
        <?php foreach($sub_rows as $k_sub => $sub):?>
        <?php if($k_sub==0):?>
        <div class="subcate" id="sub1">
        <?php endif;?>
        <?php if($k_sub==count($sub_rows)-1):?>
        </div>
        <?php endif;?>
        	<div class="linesubcate">
            	<div class="column" style="width:4%;"><input type="checkbox" name="" value="" /></div>
                <div class="column" style="width:54%;" onmouseover="Hovercat('<?php echo $sub->id;?>')" onmouseout="Outcat('<?php echo $sub->id;?>')">
                	<a href="#"><?php echo $sub->title;?></a><br />
                    <div class="action" id="neocat-<?php echo $sub->id;?>">
                    	<img src="images/edit.gif" /><a href="<?php echo admin_url('module/edit?id='.$sub->id);?>">Edit</a>|<img src="images/active.png" class="png" /><a href="#">Active</a>|<img src="images/delete.gif" /><a href="#"><font color="#be0000">Delete</font></a>
                	</div>
                </div>
                <div class="column" style="width:10%;">
                    <input type="text" name="" value="1" style="width:45px; float:left;" />
                    <span class="updown"><a href="#"><img src="images/up.gif" title="up" /></a><a href="#"><img src="images/down.gif" title="down" /></a></span>
                </div>
                <div class="column" style="width:25%;"><a href="#" class="post">326</a> / <font color="#acadad">345687</font></div>
                <div class="column" style="width:4%;"><a href="#"><img src="images/active.png" class="icon png" /></a></div>
            </div>
        <?php endforeach;?>
        <?php endif;?>
        <?php endforeach;?>
               
        </div>

    </div>